-- GENERATED SPELL FOR [Shadow Channeler] --


function spell0_32262(pUnit, Event) --@Demon Armor,Self--
pUnit:FullCastSpellOnTarget(13787,pUnit)
pUnit:RegisterEvent('Sorts_32262', 0, 1)
end

function spell1_32262(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(11962,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32262', 17000, 1)
end

function spell2_32262(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32262', 3000, 1)
end

function Sorts_32262(pUnit, Event)
local choix_sorts_32262 = math.random(0, 2)
if choix_sorts_32262 == 0 then
pUnit:RegisterEvent('spell0_32262', 1, 1)
end
if choix_sorts_32262 == 1 then
pUnit:RegisterEvent('spell1_32262', 1, 1)
end
if choix_sorts_32262 == 2 then
pUnit:RegisterEvent('spell2_32262', 1, 1)
end
end

function mob32262_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32262', math.random(1500, 3000), 1)
end

function mob32262_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32262_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32262_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32262, 1, 'mob32262_Action')
RegisterUnitEvent(32262, 2, 'mob32262_Leave')
RegisterUnitEvent(32262, 3, 'mob32262_Kill')
RegisterUnitEvent(32262, 4, 'mob32262_Die')
